
#ifndef __INTERVAL_H__
#define __INTERVAL_H__
#pragma once

class IIntervalHandler
{
private:

public:
	virtual void OnTimer() = 0;
};

#include <map>
using std::map;

class Timer
{
public:
	Timer();
	
	UINT_PTR GetTimerId() const;
	void Start(IIntervalHandler*);
	void Close();
private:
	static void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD);

	UINT_PTR m_nTimerId;

	static map<UINT_PTR, IIntervalHandler*> s_handlerMap;
};

#endif